package com.pg.entity.dd;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 报工信息
 * </p>
 *
 * @author likl
 * @since 2020-07-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class EipOperation implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 全库唯一码
     */
    @NotNull(message = "全库唯一码不能为空")
    @Length(max = 64, message = "全库唯一码过长")
    @TableId
    private String puid;

    /**
     * 采购方总部编码
     */
    @NotNull(message = "采购方总部编码不能为空")
    @Length(max = 8, message = "采购方总部编码过长")
    @Excel(name = "采购方总部编码")
    @TableField("\"purchaserHqCode\"")
    private String purchaserHqCode;

    /**
     * 供应商编码
     */
    @NotNull(message = "供应商编码不能为空")
    @Length(max = 16, message = "供应商编码过长")
    @Excel(name = "供应商编码")
    @TableField("\"supplierCode\"")
    private String supplierCode;

    /**
     * 供应商名称
     */
    @NotNull(message = "供应商名称不能为空")
    @Length(max = 32, message = "供应商名称过长")
    @Excel(name = "供应商名称")
    @TableField("\"supplierName\"")
    private String supplierName;

    /**
     * 生产订单编号
     */
    @NotNull(message = "生产订单编号不能为空")
    @Length(max = 32, message = "生产订单编号过长")
    @Excel(name = "供应商生产订单号")
    @TableField("\"ipoNo\"")
    private String ipoNo;

    /**
     * 产品内部ID号
     */
    @Length(max = 64, message = "产品内部ID号过长")
    @Excel(name = "产品内部ID号")
    @TableField("\"insideNo\"")
    private String insideNo;

    /**
     * 设备编号
     */
    @Length(max = 32, message = "设备编号过长")
    @Excel(name = "设备编号")
    @TableField("\"deviceNo\"")
    private String deviceNo;

    /**
     * 生产批次号
     */
    @Length(max = 16, message = "生产批次号过长")
    @Excel(name = "生产批次号")
    @TableField("\"productBatchNo\"")
    private String productBatchNo;

    /**
     * 产品型号
     */
    @Length(max = 64, message = "产品型号过长")
    @Excel(name = "产品型号")
    @TableField("\"productionModel\"")
    private String productionModel;

    /**
     * 生产对象名称
     */
    @Length(max = 64, message = "生产对象名称过长")
    @Excel(name = "生产对象名称")
    @TableField("\"manufacturedName\"")
    private String manufacturedName;

    /**
     * 工序名称
     */
    @NotNull(message = "工序名称不能为空")
    @Length(max = 32, message = "工序名称过长")
    @Excel(name = "工序名称")
    @TableField("\"processName\"")
    private String processName;

    /**
     * 品类编码
     */
    @NotNull(message = "品类编码不能为空")
    @Length(max = 8, message = "品类编码过长")
    @Excel(name = "品类编码")
    @TableField("\"categoryCode\"")
    private String categoryCode;

    /**
     * 种类编码
     */
    @NotNull(message = "种类编码不能为空")
    @Length(max = 8, message = "种类编码过长")
    @Excel(name = "种类编码")
    @TableField("\"subclassCode\"")
    private String subclassCode;

    /**
     * 工序编码
     */
    @NotNull(message = "工序编码不能为空")
    @Length(max = 8, message = "工序编码过长")
    @Excel(name = "工序编码")
    @TableField("\"processCode\"")
    private String processCode;

    /**
     * 生产工艺路线编码
     */
    @Length(max = 64, message = "生产工艺路线编码过长")
    @Excel(name = "生产工艺路线编码")
    @TableField("\"processNo\"")
    private String processNo;

    /**
     * 生产车间id
     */
    @Length(max = 16, message = "生产车间id过长")
    @Excel(name = "生产车间id")
    @TableField("\"workshopId\"")
    private String workshopId;

    /**
     * 生产车间编码
     */
    @Length(max = 16, message = "生产车间编码过长")
    @Excel(name = "生产车间编码")
    @TableField("\"workshopCode\"")
    private String workshopCode;

    /**
     * 生产车间名称
     */
    @Length(max = 32, message = "生产车间名称过长")
    @Excel(name = "生产车间名称")
    @TableField("\"workshopName\"")
    private String workshopName;

    /**
     * 生产工单编号
     */
    @NotNull(message = "生产工单编号不能为空")
    @Length(max = 32, message = "生产工单编号过长")
    @Excel(name = "生产工单编号")
    @TableField("\"woNo\"")
    private String woNo;

    /**
     * 实物id，如国网实物id
     */
    @Length(max = 16, message = "实物id过长")
    @Excel(name = "实物ID")
    @TableField("\"productId\"")
    private String productId;

    /**
     * 数据来源
     */
    @NotNull(message = "数据来源不能为空")
    @Length(max = 8, message = "数据来源过长")
    @Excel(name = "数据来源")
    @TableField("\"dataSource\"")
    private String dataSource;

    /**
     * 来源数据创建时间
     */
    @NotNull(message = "来源数据创建时间不能为空")
    @Excel(name = "来源数据创建时间", format = "yyyy-MM-dd HH:mm:ss")
    @TableField("\"dataSourceCreateTime\"")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date dataSourceCreateTime;

    /**
     * 计划开始时间
     */
    @Excel(name = "计划开始日期", format = "yyyy-MM-dd HH:mm:ss")
    @TableField("\"planStartTime\"")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date planStartTime;

    /**
     * 计划结束时间
     */
    @Excel(name = "计划完成日期", format = "yyyy-MM-dd HH:mm:ss")
    @TableField("\"planEndTime\"")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date planEndTime;

    /**
     * 实际开始时间
     */
    @Excel(name = "实际开始日期", format = "yyyy-MM-dd HH:mm:ss")
    @TableField("\"actualStartDate\"")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date actualStartDate;

    /**
     * 实际结束时间
     */
    @Excel(name = "实际完成日期", format = "yyyy-MM-dd HH:mm:ss")
    @TableField("\"actualFinishDate\"")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date actualFinishDate;

    /**
     * 订单状态
     */
    @Length(max = 8, message = "订单状态过长")
    @Excel(name = "订单状态")
    @TableField("\"orderStatus\"")
    private String orderStatus;

    /**
     * 客户所属省份
     */
    @NotNull(message = "客户所属省份不能为空")
    @Length(max = 64, message = "客户所属省份过长")
    @Excel(name = "客户所属省份")
    @TableField("\"buyerProvince\"")
    private String buyerProvince;

    /**
     * 数据拥有方
     */
    @Length(max = 16, message = "数据拥有方过长")
    @Excel(name = "数据拥有方")
    @TableField("\"ownerId\"")
    private String ownerId;

    /**
     * 数据可见方
     */
    @Length(max = 16, message = "数据可见方过长")
    @Excel(name = "数据可见方")
    @TableField("\"openId\"")
    private String openId;

    /**
     * 报告批注
     */
    @Length(max = 32, message = "报告批注过长")
    @Excel(name = "报告批注")
    private String comment;

    /**
     * 逻辑删除
     */
    @NotNull(message = "逻辑删除不能为空")
    @Length(max = 1, message = "逻辑删除过长")
    @Excel(name = "逻辑删除")
    @TableField("\"isDeleted\"")
    private String isDeleted;

    /**
     * 状态表示
     */
    @Length(max = 8, message = "状态表示过长")
    private String ioflag;

    @TableField("\"ModifyTime\"")
    private String ModifyTime;

    /**
     * 错误信息
     */
    private String message;

    /**
     * 本条数据是新增/更新
     */
    private String status;

    /**
     * 全局流水号
     */
    private String transno;

    /**
     * 预留字段1
     */
    private String remark1;

    /**
     * 预留字段2
     */
    private String remark2;

    /**
     * 预留字段3
     */
    private String remark3;

    /**
     * 预留字段4
     */
    private String remark4;

    /**
     * 预留字段5
     */
    private String remark5;
    private static String rexp1 = "((\\d{2}(([02468][048])|([13579][26]))[\\-]((((0?[13578])|(1[02]))[\\-]((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-]((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-]((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))[\\-]((((0?[13578])|(1[02]))[\\-]((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-]((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-]((0?[1-9])|(1[0-9])|(2[0-8]))))))";
    private static String rexp2 = "((\\d{2}(([02468][048])|([13579][26]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])))))|(\\d{2}(([02468][1235679])|([13579][01345789]))[\\-\\/\\s]?((((0?[13578])|(1[02]))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(3[01])))|(((0?[469])|(11))[\\-\\/\\s]?((0?[1-9])|([1-2][0-9])|(30)))|(0?2[\\-\\/\\s]?((0?[1-9])|(1[0-9])|(2[0-8]))))))(\\s((([0-1][0-9])|(2?[0-3]))\\:([0-5]?[0-9])((\\s)|(\\:([0-5]?[0-9])))))";

}
